This invention relates to a magnetic detector using a magnetic resistance element and, more particularly, the application of such detector as a frequency generator incorporated in a motor.